package com.app.GoCuro.data;

import java.io.Serializable;

@SuppressWarnings("serial")
public class LoginResponse implements Serializable
{
	private String userDefaultJobsite;
	private String userJobsiteId;
	private String userName;
	private String password;
	private String userId;
	private boolean succeeded;
	private String errorString;
	
	/*
	 * Sets all information on a successful login
	 */
	public void SetParameters(String jobsite, String jobsiteId, String name, String id, String pwd )
	{
		userDefaultJobsite = jobsite;
		userJobsiteId = jobsiteId;
		userName = name;
		password = pwd;
		userId = id;
		succeeded = true;
	}
	
	/*
	 * Public accessors for user information
	 */
	public String getDefaultJobsite()
	{
		return userDefaultJobsite;
	}
	public String getJobsiteId()
	{
		return userJobsiteId;
	}
	public String getUserName()
	{
		return userName;
	}
	public String getPwd()
	{
		return password;
	}
	public String getUserId()
	{
		return userId;
	}

	
	/*
	 * Methods for setting and acessing error codes in the event of a login failure
	 */
	public void setErrorString(String error)
	{
		succeeded = false;
		errorString = error;
	}
	public boolean getSucceeded()
	{
		return succeeded;
	}
	public String getErrorString()
	{
		return errorString;
	}
}
